package org.jianghu.activity.main.presenter;

import android.content.Context;

import org.jianghu.activity.main.view.MainView;
import org.jianghu.base.BaseRequest;
import org.jianghu.base.model.MsMessage;
import org.jianghu.utils.SharedPreferencesUtil;


/**
 * Created by Gtexpress on 16/12/7.
 */

public class MainPresenterCompl extends BaseRequest implements MainPressenter {

    private MainView mainView;
    private Context context;
    public MainPresenterCompl(MainView mainView,Context context){
        this.mainView = mainView;
        this.context = context;
    }

    @Override
    public void doRequest(int requestCode) {

    }

    @Override
    public void requestCallBack(boolean isSuccess, int requestCode, MsMessage msm, String failedReason) {

    }

    @Override
    public void doEmptyCheck(Object... needParams) {

    }

    @Override
    public void isLogin() {
        if (SharedPreferencesUtil.getUser(context) != null){
            mainView.isLogin(true);
        }else{
            mainView.isLogin(false);
        }
    }
}
